cargo.git
11 years agoAuto merge of #1278 - alexcrichton:style, r=brson
bors [Mon, 9 Feb 2015 20:54:26 +0000 (20:54 +0000)]
Auto merge of #1278 - alexcrichton:style, r=brson

* Update to rust master
* Remove many calls to `.as_slice` (deref coercions)
* Remove `get_` prefixes

11 years agoUpdate to rust master
Alex Crichton [Mon, 9 Feb 2015 16:16:08 +0000 (08:16 -0800)]
Update to rust master

11 years agoAuto merge of #1282 - vrinek:master, r=alexcrichton
bors [Mon, 9 Feb 2015 19:24:58 +0000 (19:24 +0000)]
Auto merge of #1282 - vrinek:master, r=alexcrichton

11 years agoAdd link to requirement strings explanation in the manifest.md doc
Kostas Karachalios [Mon, 9 Feb 2015 15:42:54 +0000 (16:42 +0100)]
Add link to requirement strings explanation in the manifest.md doc

11 years agoRemove leading `get_` prefix from accessors
Alex Crichton [Fri, 6 Feb 2015 08:36:19 +0000 (00:36 -0800)]
Remove leading `get_` prefix from accessors

The current naming is [against our guidelines][guidelines]

[guidelines]: https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis

11 years agoDown with .as_slice()!
Alex Crichton [Fri, 6 Feb 2015 08:06:39 +0000 (00:06 -0800)]
Down with .as_slice()!

11 years agoUpdate to rust master
Alex Crichton [Fri, 6 Feb 2015 07:27:53 +0000 (23:27 -0800)]
Update to rust master

11 years agoAuto merge of #1271 - alexcrichton:issue-1267, r=brson
bors [Fri, 6 Feb 2015 22:55:29 +0000 (22:55 +0000)]
Auto merge of #1271 - alexcrichton:issue-1267, r=brson

Why not use `try!` instead!

Closes #1267

11 years agoAuto merge of #1270 - alexcrichton:issue-1105, r=brson
bors [Fri, 6 Feb 2015 22:44:07 +0000 (22:44 +0000)]
Auto merge of #1270 - alexcrichton:issue-1105, r=brson

Closes #1105

11 years agoAuto merge of #1269 - alexcrichton:issue-961, r=brson
bors [Fri, 6 Feb 2015 22:31:46 +0000 (22:31 +0000)]
Auto merge of #1269 - alexcrichton:issue-961, r=brson

Over time this functionality has become obsolete through other means. Due to the
usage of `-L dependency=foo` it's not possible to pick up stale dependencies by
accident, and due to `--extern` you can only pick up a dependency. All of the
cases that auto-cleaning was fixing are now fixed through other methods, so
there's not much use ensuring a "clean build directory" any more.

This has the benefit of fixing issues like #961 where the downside of long
compiles outweighs the benefits of a "let's pretend we started from scratch"
build.

Closes #961

11 years agoAuto merge of #1261 - alexcrichton:issue-1259, r=wycats
bors [Wed, 4 Feb 2015 23:00:30 +0000 (23:00 +0000)]
Auto merge of #1261 - alexcrichton:issue-1259, r=wycats

Previously if a fingerprint was considered fresh based on mtime, it would not
get updated once a compilation finished with the new precise fingerprint (it
would use the older fingerprint). This alters the `resolve` method to take a
flag which disables this behavior and forces looking at the filesystem for a
fingerprint.

Closes #1259

11 years agoAdd a flag to force resolution of a fingerprint
Alex Crichton [Sun, 1 Feb 2015 23:21:15 +0000 (15:21 -0800)]
Add a flag to force resolution of a fingerprint

Previously if a fingerprint was considered fresh based on mtime, it would not
get updated once a compilation finished with the new precise fingerprint (it
would use the older fingerprint). This alters the `resolve` method to take a
flag which disables this behavior and forces looking at the filesystem for a
fingerprint.

Closes #1259

11 years agoRemove auto-cleaning of the build directory
Alex Crichton [Wed, 14 Jan 2015 05:23:43 +0000 (21:23 -0800)]
Remove auto-cleaning of the build directory

Over time this functionality has become obsolete through other means. Due to the
usage of `-L dependency=foo` it's not possible to pick up stale dependencies by
accident, and due to `--extern` you can only pick up a dependency. All of the
cases that auto-cleaning was fixing are now fixed through other methods, so
there's not much use ensuring a "clean build directory" any more.

This has the benefit of fixing issues like #961 where the downside of long
compiles outweighs the benefits of a "let's pretend we started from scratch"
build.

Closes #961

11 years agoAuto merge of #1275 - alexcrichton:update, r=alexcrichton
bors [Wed, 4 Feb 2015 18:31:58 +0000 (18:31 +0000)]
Auto merge of #1275 - alexcrichton:update, r=alexcrichton

Expanding on the work of #1256 to update to rustc 02-02

11 years agoUpdate to the most current nightly
Alex Crichton [Wed, 4 Feb 2015 18:12:49 +0000 (10:12 -0800)]
Update to the most current nightly

11 years agoMerge branch 'rust-master' of https://github.com/gbsf/cargo into update
Alex Crichton [Wed, 4 Feb 2015 18:07:07 +0000 (10:07 -0800)]
Merge branch 'rust-master' of https://github.com/gbsf/cargo into update

11 years agoAvoid `unwrap` when parsing lockfiles
Alex Crichton [Wed, 4 Feb 2015 07:27:06 +0000 (23:27 -0800)]
Avoid `unwrap` when parsing lockfiles

Why not use `try!` instead!

Closes #1267

11 years agoSupport update --precise for registry deps
Alex Crichton [Wed, 4 Feb 2015 00:55:07 +0000 (16:55 -0800)]
Support update --precise for registry deps

Closes #1105

11 years agoSquelch warnings
Gabriel Souza Franco [Fri, 30 Jan 2015 21:22:02 +0000 (19:22 -0200)]
Squelch warnings

11 years agoFix failing test
Gabriel Souza Franco [Fri, 30 Jan 2015 19:24:53 +0000 (17:24 -0200)]
Fix failing test

11 years agoRemove unnecessary allow(unstable)
Gabriel Souza Franco [Fri, 30 Jan 2015 18:12:47 +0000 (16:12 -0200)]
Remove unnecessary allow(unstable)

11 years agoUpdate rustversion.txt
Gabriel Souza Franco [Fri, 30 Jan 2015 17:53:15 +0000 (15:53 -0200)]
Update rustversion.txt

11 years agoWorkaround to make code compile
Gabriel Souza Franco [Fri, 30 Jan 2015 17:38:33 +0000 (15:38 -0200)]
Workaround to make code compile

Blame @alexcrichton

11 years agoUpdate dependencies
Gabriel Souza Franco [Fri, 30 Jan 2015 15:21:23 +0000 (13:21 -0200)]
Update dependencies

11 years agoUpdate log crate to v0.2
Gabriel Souza Franco [Fri, 30 Jan 2015 14:36:24 +0000 (12:36 -0200)]
Update log crate to v0.2

11 years agoWriter::write → Writer::write_all
Gabriel Souza Franco [Fri, 30 Jan 2015 14:38:21 +0000 (12:38 -0200)]
Writer::write → Writer::write_all

11 years agostd::io → std::old_io
Gabriel Souza Franco [Fri, 30 Jan 2015 13:48:43 +0000 (11:48 -0200)]
std::io → std::old_io

11 years agoAuto merge of #1250 - alexcrichton:issue-1248, r=brson
bors [Fri, 30 Jan 2015 02:47:30 +0000 (02:47 +0000)]
Auto merge of #1250 - alexcrichton:issue-1248, r=brson

When probing a repository for files that should be considered as inputs for a
build script we should just skip submodules that haven't been checked out
instead of throwing an error.

Closes #1248

11 years agoAuto merge of #1243 - alexcrichton:issue-1239, r=brson
bors [Fri, 30 Jan 2015 02:37:24 +0000 (02:37 +0000)]
Auto merge of #1243 - alexcrichton:issue-1239, r=brson

Previously a build script would assign itself to the platform requirement for
the first target of a package, but it's more correct to consider all targets for
platform requirements as there may be both a plugin and target requirement.

Closes #1236

11 years agoAuto merge of #1247 - tshepang:hgignore-love, r=alexcrichton
bors [Thu, 29 Jan 2015 20:05:39 +0000 (20:05 +0000)]
Auto merge of #1247 - tshepang:hgignore-love, r=alexcrichton

11 years agoAuto merge of #1242 - alexcrichton:issue-1236, r=wycats
bors [Thu, 29 Jan 2015 19:50:58 +0000 (19:50 +0000)]
Auto merge of #1242 - alexcrichton:issue-1236, r=wycats

Set out to solve #1236, but ended up solving #834 as well!

11 years agoDon't require all submodules are checked out
Alex Crichton [Thu, 29 Jan 2015 19:41:00 +0000 (11:41 -0800)]
Don't require all submodules are checked out

When probing a repository for files that should be considered as inputs for a
build script we should just skip submodules that haven't been checked out
instead of throwing an error.

Closes #1248

11 years agoForbid cyclic dependencies
Alex Crichton [Thu, 29 Jan 2015 05:50:06 +0000 (21:50 -0800)]
Forbid cyclic dependencies

Re-jigger some code in the resolver and refactor a little bit to get the
ordering of checks right to forbid cyclic dependencies from ever reaching the
backend.

Closes #834

11 years agoConsider all targets for platform requirements
Alex Crichton [Thu, 29 Jan 2015 06:28:31 +0000 (22:28 -0800)]
Consider all targets for platform requirements

Previously a build script would assign itself to the platform requirement for
the first target of a package, but it's more correct to consider all targets for
platform requirements as there may be both a plugin and target requirement.

Closes #1230

11 years agonew: use .{git,hg}ignore syntax that's also understood by Mercurial
Tshepang Lekhonkhobe [Thu, 29 Jan 2015 17:41:53 +0000 (19:41 +0200)]
new: use .{git,hg}ignore syntax that's also understood by Mercurial

11 years agoConsider transitive fingerprints for freshness
Alex Crichton [Thu, 29 Jan 2015 03:37:19 +0000 (19:37 -0800)]
Consider transitive fingerprints for freshness

Originally discovered through #1236, this commit fixes a bug in Cargo where
crates may not be recompiled when they need to (leading to obscure errors from
the compiler). The scenario in question looks like:

* Assume a dependency graph of `A -> B -> C` and `A -> C`
* Build all packages
* Modify C
* Rebuild, but hit Ctrl+C while B is building
* Modify A
* Rebuild again

Previously, Cargo only considered the freshness of a package to be the freshness
of the package itself (checking source files, for example). To handle transitive
recompilations, Cargo propagates a dirty bit throughout the dependency graph
automatically (instead if calculating it as such).

In the above example, however, we have a problem where as part of the last
rebuild Cargo thinks `B` and `C` are fresh! The artifact for `C` was just
recompiled, but `B`'s source code is untainted, so Cargo does not think that it
needs to recompile `B`. This is wrong, however, because one of `B`'s
dependencies was rebuilt, so it needs to be rebuilt.

To fix this problem, the fingerprint (a short hash) for all packages is now
transitively propagated (the fingerprint changes when an upstream package
changes). This should ensure that even when Ctrl+C is hit (or the situation
explained in #1236) that Cargo will still consider packages whose source code is
untainted as candidates for recompilation.

The implementation is somewhat tricky due to the actual fingerprint for a path
dependency not being known until *after* the crate is compiled (the fingerprint
is the mtime of the dep-info file).

Closes #1236

11 years agoAuto merge of #1232 - alexcrichton:issue-1231, r=huonw
bors [Thu, 29 Jan 2015 00:56:56 +0000 (00:56 +0000)]
Auto merge of #1232 - alexcrichton:issue-1231, r=huonw

* Break out the error reporting to its own separate function
* Don't pass `Context` by value as it's quite large, instead pass `Box<Context>`
* Don't bother monomorphizing `R: Registry`, instead just take a trait object.

Closes #1231

11 years agoAuto merge of #1238 - SimonSapin:patch-2, r=alexcrichton
bors [Wed, 28 Jan 2015 22:33:03 +0000 (22:33 +0000)]
Auto merge of #1238 - SimonSapin:patch-2, r=alexcrichton

11 years agoUpdate a code example for language change
Simon Sapin [Wed, 28 Jan 2015 21:32:27 +0000 (22:32 +0100)]
Update a code example for language change

11 years agoOptimize stack usage of activate_deps slightly
Alex Crichton [Tue, 27 Jan 2015 05:18:57 +0000 (21:18 -0800)]
Optimize stack usage of activate_deps slightly

* Break out the error reporting to its own separate function
* Don't pass `Context` by value as it's quite large, instead pass `Box<Context>`
* Don't bother monomorphizing `R: Registry`, instead just take a trait object.

Closes #1231

11 years agoAuto merge of #1227 - retep998:master, r=huonw
bors [Mon, 26 Jan 2015 02:53:23 +0000 (02:53 +0000)]
Auto merge of #1227 - retep998:master, r=huonw

Fixes the following issue while building Cargo
```
   Compiling cargo v0.1.0 (file:///C:/msys64/home/Peter/cargo)
src\cargo\lib.rs:7:1: 7:20 error: can't find crate for `regex`
src\cargo\lib.rs:7 extern crate regex;
                   ^~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
Could not compile `cargo`.
```

11 years agoAdd explicit dependency on regex.
Peter Atashian [Mon, 26 Jan 2015 00:59:38 +0000 (19:59 -0500)]
Add explicit dependency on regex.

Signed-off-by: Peter Atashian <retep998@gmail.com>
11 years agoAuto merge of #1222 - alexcrichton:update, r=alexcrichton
bors [Sun, 25 Jan 2015 07:48:47 +0000 (07:48 +0000)]
Auto merge of #1222 - alexcrichton:update, r=alexcrichton

11 years agoUpdate to rust 2015-01-24
Alex Crichton [Sun, 25 Jan 2015 06:03:42 +0000 (22:03 -0800)]
Update to rust 2015-01-24

11 years agoMerge branch 'master' of https://github.com/suhr/cargo into update
Alex Crichton [Sun, 25 Jan 2015 05:48:48 +0000 (21:48 -0800)]
Merge branch 'master' of https://github.com/suhr/cargo into update

11 years agoAuto merge of #1218 - emanueLczirai:verbose1, r=alexcrichton
bors [Sat, 24 Jan 2015 19:51:27 +0000 (19:51 +0000)]
Auto merge of #1218 - emanueLczirai:verbose1, r=alexcrichton

and also show that cargo's version after rustc's one

Closes #1216

11 years agopass --verbose to cargo when VERBOSE env is set
emanueLczirai [Sat, 24 Jan 2015 17:48:19 +0000 (18:48 +0100)]
pass --verbose to cargo when VERBOSE env is set

and also show that cargo's version after rustc's one

11 years agoupdate to recent rust changes: part #2
Сухарик [Sat, 24 Jan 2015 08:16:54 +0000 (11:16 +0300)]
update to recent rust changes: part #2

11 years agofix build on recent rust: use `unwrap` on `encode`
Сухарик [Fri, 23 Jan 2015 22:55:25 +0000 (01:55 +0300)]
fix build on recent rust: use `unwrap` on `encode`

11 years agoupdate to recent rust changes: part #1
Сухарик [Fri, 23 Jan 2015 18:42:29 +0000 (21:42 +0300)]
update to recent rust changes: part #1

11 years agoAuto merge of #1202 - alexcrichton:issue-1201, r=huonw
bors [Thu, 22 Jan 2015 06:06:34 +0000 (06:06 +0000)]
Auto merge of #1202 - alexcrichton:issue-1201, r=huonw

Previously an error's description was not printed at all if it was not a "human
error". This alters the logic to always print the description on --verbose, as
well as ensuring that --verbose is suggested if this is the case and we're not
verbose.

Closes #1201

11 years agoAuto merge of #1205 - alexcrichton:case-sensitivity, r=brson
bors [Thu, 22 Jan 2015 05:48:09 +0000 (05:48 +0000)]
Auto merge of #1205 - alexcrichton:case-sensitivity, r=brson

All crates published will enter the index in an all-lowercase fashion. This is
done because the index may be checked out on case-insensitive filesystems and
its integrity needs to be preserved. When looking for a file in the index, a
crate's name is transformed to all lowercase, but the mentioned name in the
index is verified against the name queried to ensure that they match.

Closes rust-lang/crates.io#93
cc rust-lang/crates.io-index#1

11 years agoSearch the index case-insensitively
Alex Crichton [Wed, 21 Jan 2015 20:24:34 +0000 (12:24 -0800)]
Search the index case-insensitively

All crates published will enter the index in an all-lowercase fashion. This is
done because the index may be checked out on case-insensitive filesystems and
its integrity needs to be preserved. When looking for a file in the index, a
crate's name is transformed to all lowercase, but the mentioned name in the
index is verified against the name queried to ensure that they match.

Closes rust-lang/crates.io#93
cc rust-lang/crates.io-index#1

11 years agoAuto merge of #1199 - retep998:winapi, r=alexcrichton
bors [Tue, 20 Jan 2015 17:24:32 +0000 (17:24 +0000)]
Auto merge of #1199 - retep998:winapi, r=alexcrichton

11 years agoFix printing full descriptions on --verbose
Alex Crichton [Tue, 20 Jan 2015 16:07:26 +0000 (08:07 -0800)]
Fix printing full descriptions on --verbose

Previously an error's description was not printed at all if it was not a "human
error". This alters the logic to always print the description on --verbose, as
well as ensuring that --verbose is suggested if this is the case and we're not
verbose.

Closes #1201

11 years agoUse external crates for Windows FFI
Peter Atashian [Tue, 20 Jan 2015 16:01:52 +0000 (11:01 -0500)]
Use external crates for Windows FFI

Signed-off-by: Peter Atashian <retep998@gmail.com>
11 years agoAuto merge of #1190 - alexcrichton:issue-1186, r=alexcrichton
bors [Tue, 20 Jan 2015 04:51:54 +0000 (04:51 +0000)]
Auto merge of #1190 - alexcrichton:issue-1186, r=alexcrichton

Closes #1186

11 years agoAuto merge of #1195 - alexcrichton:no-more-build-command, r=huonw
bors [Tue, 20 Jan 2015 01:25:10 +0000 (01:25 +0000)]
Auto merge of #1195 - alexcrichton:no-more-build-command, r=huonw

Along the way this also fixes a few bugs with build scripts with respect to dynamic native libraries which are linked into build scripts themselves.

11 years agoAuto merge of #1196 - alexcrichton:issue-1187, r=alexcrichton
bors [Tue, 20 Jan 2015 00:38:16 +0000 (00:38 +0000)]
Auto merge of #1196 - alexcrichton:issue-1187, r=alexcrichton

Closes #1187

11 years agoFix code example in the guide
Alex Crichton [Tue, 20 Jan 2015 00:03:41 +0000 (16:03 -0800)]
Fix code example in the guide

Closes #1187

11 years agoAugment dylib search paths for rustc/build scripts
Alex Crichton [Mon, 19 Jan 2015 23:46:07 +0000 (15:46 -0800)]
Augment dylib search paths for rustc/build scripts

Whenever a build script or a plugin depends on a native dynamic library, the
dylib search path will be required to include the path to the generated dynamic
library. Currently Cargo does not augment the search path, causing load errors
or execution errors whenever builds are attempted in this case.

This commit remedies the situation by ensuring that dynamic libraries show up in
dylib search paths. This commit is necessary to fully migrate the remaining
tests from the old build command infrastructure to build scripts.

11 years agoRemove infrastructure for the old custom build command
Alex Crichton [Mon, 19 Jan 2015 22:27:51 +0000 (14:27 -0800)]
Remove infrastructure for the old custom build command

This aspect of the manifest has been deprecated for quite some time now, and
this commit purges the support entirely.

11 years agoAuto merge of #1193 - alexcrichton:update, r=huonw
bors [Mon, 19 Jan 2015 23:13:03 +0000 (23:13 +0000)]
Auto merge of #1193 - alexcrichton:update, r=huonw

One important update this picks up is toml-rs v0.1.13 which includes some recent changes to the TOML spec (shouldn't be breaking for Cargo though)

11 years agoUpdate to rust master
Alex Crichton [Mon, 19 Jan 2015 21:19:46 +0000 (13:19 -0800)]
Update to rust master

11 years agoAuto merge of #1191 - alexcrichton:fix-bots, r=huonw
bors [Mon, 19 Jan 2015 07:28:44 +0000 (07:28 +0000)]
Auto merge of #1191 - alexcrichton:fix-bots, r=huonw

The nightly bots are all failing because a nightly build emits a .cargo/config
which uses `[target]` for some overrides, but a test was creating invalid
configuration for `[target]`, causing the test error message to change.

This commit fixes the test by using a different error message (which should not
conflict). It also improves the error message for "configuration could not be
merged" to include more contextual information about what just happened.

11 years agoFix nightly and improve merge error message
Alex Crichton [Mon, 19 Jan 2015 05:02:25 +0000 (21:02 -0800)]
Fix nightly and improve merge error message

The nightly bots are all failing because a nightly build emits a .cargo/config
which uses `[target]` for some overrides, but a test was creating invalid
configuration for `[target]`, causing the test error message to change.

This commit fixes the test by using a different error message (which should not
conflict). It also improves the error message for "configuration could not be
merged" to include more contextual information about what just happened.

11 years agoUpdate `cargo update` syntax in the guide
Alex Crichton [Mon, 19 Jan 2015 02:56:30 +0000 (18:56 -0800)]
Update `cargo update` syntax in the guide

Closes #1186

11 years agoAuto merge of #1189 - alexcrichton:issue-1185, r=huonw
bors [Mon, 19 Jan 2015 02:53:02 +0000 (02:53 +0000)]
Auto merge of #1189 - alexcrichton:issue-1185, r=huonw

Closes #1185

11 years agoUpdate build script docs for rustc changes
Alex Crichton [Mon, 19 Jan 2015 02:36:17 +0000 (18:36 -0800)]
Update build script docs for rustc changes

Closes #1185

11 years agoAuto merge of #1183 - parkr:patch-1, r=wycats
bors [Sun, 18 Jan 2015 18:25:21 +0000 (18:25 +0000)]
Auto merge of #1183 - parkr:patch-1, r=wycats

This seemed a little crucial.

11 years agoAdd note about specifying dependencies.
Parker Moore [Sat, 17 Jan 2015 08:55:58 +0000 (00:55 -0800)]
Add note about specifying dependencies.

11 years agoAuto merge of #1176 - alexcrichton:less-relative, r=alexcrichton
bors [Fri, 16 Jan 2015 19:56:26 +0000 (19:56 +0000)]
Auto merge of #1176 - alexcrichton:less-relative, r=alexcrichton

Turns out path_relative_from returns Some even if they're not ancestors of one
another! This adds an explicit check for `is_ancestor_of`.

11 years agoActually use absolute paths for crates.io crates
Alex Crichton [Thu, 15 Jan 2015 20:17:18 +0000 (12:17 -0800)]
Actually use absolute paths for crates.io crates

Turns out path_relative_from returns Some even if they're not ancestors of one
another! This adds an explicit check for `is_ancestor_of`.

11 years agoAuto merge of #1172 - alexcrichton:issue-1087, r=huonw
bors [Fri, 16 Jan 2015 19:03:06 +0000 (19:03 +0000)]
Auto merge of #1172 - alexcrichton:issue-1087, r=huonw

These commits aim to streamline how errors are generated and how configuration is read to be less error prone and more easily extensible.

This was a whole bunch of yak shaving when tackling #1087.

11 years agoPrint human errors in traces by default
Alex Crichton [Fri, 16 Jan 2015 17:43:28 +0000 (09:43 -0800)]
Print human errors in traces by default

This helps get nice pretty stack traces which terminate when we get into the
weeds of errors but still present relevant contextual information when Cargo
isn't run with --verbose

11 years agoDon't lose error traces in manifest parse errors
Alex Crichton [Thu, 15 Jan 2015 19:12:13 +0000 (11:12 -0800)]
Don't lose error traces in manifest parse errors

Closes #1174

11 years agoAllow configuration of jobs by default via build.jobs
Alex Crichton [Thu, 15 Jan 2015 08:20:56 +0000 (00:20 -0800)]
Allow configuration of jobs by default via build.jobs

Continuation of #1114
Closes #1108

11 years agoAdd a configuration option for HTTP timeouts
Alex Crichton [Wed, 14 Jan 2015 18:11:08 +0000 (10:11 -0800)]
Add a configuration option for HTTP timeouts

Closes #1087

11 years agoVastly improve configuration error messages
Alex Crichton [Wed, 14 Jan 2015 17:58:43 +0000 (09:58 -0800)]
Vastly improve configuration error messages

This commit seeks to improve error messages with respect to a misconfigured
Cargo. This is done with a few principles and architectural changes:

* All error messages related to configuration should now mention the file in
  question.
* All error messages should print the key in question which was in error.
* Loading configuration values is now centralized in the `Config` structure,
  providing precisely one location where error message originate from. The
  messages were previously strewn and duplicated about.
* The `Config` structure now provides typed `get_foo` methods to load various
  configuration keys of various types.

11 years agoOverhaul how Config is passed around
Alex Crichton [Wed, 14 Jan 2015 08:19:27 +0000 (00:19 -0800)]
Overhaul how Config is passed around

This commit started out by moving the hash map of configuration values into
`Config` and then removing all calls to config::all_configs in favor of taking a
`&Config` argument. This initial step was taken to prevent reloading
configuration many times from disk, but it also provides a nice house for
configuration to be loaded from.

The commit snowballed into purging `MultiShell` as an argument all over the
place and passing around `Config` instead. Along the way a few other breaking
changes were made:

* The `config_for_key` and `config_list` subcommands have been removed. These
  commands are not ready to be stabilized and need some more work. In general
  the `cargo config` system needs to be cleaned out and built back up with a new
  interface, at which point these subcommands can return.
* The old and deprecated behavior of `cargo update foo` has been removed.

11 years agoAuto merge of #1166 - alexcrichton:docs, r=steveklabnik
bors [Fri, 16 Jan 2015 04:17:53 +0000 (04:17 +0000)]
Auto merge of #1166 - alexcrichton:docs, r=steveklabnik

11 years agoAdd a short section about path dependencies
Alex Crichton [Wed, 14 Jan 2015 04:04:43 +0000 (20:04 -0800)]
Add a short section about path dependencies

Closes #640

11 years agoCall out libs a little more in the guide
Alex Crichton [Wed, 14 Jan 2015 03:59:00 +0000 (19:59 -0800)]
Call out libs a little more in the guide

Closes #643

11 years agoClarify that features are actually sets of features
Alex Crichton [Wed, 14 Jan 2015 03:56:48 +0000 (19:56 -0800)]
Clarify that features are actually sets of features

Closes #938

11 years agoMention profiles in --help pages
Alex Crichton [Wed, 14 Jan 2015 03:54:55 +0000 (19:54 -0800)]
Mention profiles in --help pages

Closes #999

11 years agoAuto merge of #1151 - alexcrichton:issue-1145, r=wycats
bors [Wed, 14 Jan 2015 19:14:12 +0000 (19:14 +0000)]
Auto merge of #1151 - alexcrichton:issue-1145, r=wycats

The new message will print out a selection of versions that were found if any
are to be had, as well as a recommendation to run `cargo update` if it's a path
dependency.

Closes #1145

11 years agoPrint nicer messages on 'no package named' errors
Alex Crichton [Sun, 11 Jan 2015 07:03:58 +0000 (23:03 -0800)]
Print nicer messages on 'no package named' errors

The new message will print out a selection of versions that were found if any
are to be had, as well as a recommendation to run `cargo update` if it's a path
dependency.

Closes #1145

11 years agoAuto merge of #1164 - alexcrichton:issue-209, r=huonw
bors [Wed, 14 Jan 2015 16:44:32 +0000 (16:44 +0000)]
Auto merge of #1164 - alexcrichton:issue-209, r=huonw

All paths printed will now be absolute paths unless the path is a descendant of
the current directory. This should keep error messages and warnings of a
reasonable length when working with the local project while still allowing
errors in registry/git dependencies to be tracked down.

Special care is taken in these situations to ensure that the error message from
the compiler prints a reasonable path.

Closes #209
Closes #694

11 years agoAuto merge of #1168 - alexcrichton:issue-822, r=huonw
bors [Wed, 14 Jan 2015 16:22:15 +0000 (16:22 +0000)]
Auto merge of #1168 - alexcrichton:issue-822, r=huonw

Closes #822

11 years agoAuto merge of #1167 - alexcrichton:issue-820, r=huonw
bors [Wed, 14 Jan 2015 09:04:10 +0000 (09:04 +0000)]
Auto merge of #1167 - alexcrichton:issue-820, r=huonw

Probably a good sanity check to have up front to ensure that you've got a C
compiler locally!

Closes #820

11 years agoAuto merge of #1163 - alexcrichton:better-errors, r=huonw
bors [Wed, 14 Jan 2015 06:55:18 +0000 (06:55 +0000)]
Auto merge of #1163 - alexcrichton:better-errors, r=huonw

Print out the path to the manifest in question whenever a parsing error is
encountered.

11 years agoAuto merge of #1165 - alexcrichton:issue-517, r=huonw
bors [Wed, 14 Jan 2015 06:12:53 +0000 (06:12 +0000)]
Auto merge of #1165 - alexcrichton:issue-517, r=huonw

It's a little odd that Cargo only supports travis right now, and as #517 points
out it probably shouldn't be a top-level flag but rather a general "service
flag". Due to a lack of other services and the ease of adding your own travis
configuration, this commit removes the flag altogether for now. It can always be
added later when we've got some more impetus!

Closes #517
Closes #1115

11 years agoUse same find -perm syntax as rustc
Alex Crichton [Wed, 14 Jan 2015 04:21:52 +0000 (20:21 -0800)]
Use same find -perm syntax as rustc

Closes #822

11 years agoProbe for a C compiler in the configure script
Alex Crichton [Wed, 14 Jan 2015 04:19:26 +0000 (20:19 -0800)]
Probe for a C compiler in the configure script

Probably a good sanity check to have up front to ensure that you've got a C
compiler locally!

Closes #820

11 years agoRemove --travis from `cargo new`
Alex Crichton [Wed, 14 Jan 2015 03:48:00 +0000 (19:48 -0800)]
Remove --travis from `cargo new`

It's a little odd that Cargo only supports travis right now, and as #517 points
out it probably shouldn't be a top-level flag but rather a general "service
flag". Due to a lack of other services and the ease of adding your own travis
configuration, this commit removes the flag altogether for now. It can always be
added later when we've got some more impetus!

Closes #517
Closes #1115

11 years agoTweak how source paths are passed to the compiler
Alex Crichton [Wed, 14 Jan 2015 03:10:16 +0000 (19:10 -0800)]
Tweak how source paths are passed to the compiler

All paths printed will now be absolute paths unless the path is a descendant of
the current directory. This should keep error messages and warnings of a
reasonable length when working with the local project while still allowing
errors in registry/git dependencies to be tracked down.

Special care is taken in these situations to ensure that the error message from
the compiler prints a reasonable path.

Closes #209
Closes #694

11 years agoImprove errors for invalid manifests
Alex Crichton [Wed, 14 Jan 2015 02:43:33 +0000 (18:43 -0800)]
Improve errors for invalid manifests

Print out the path to the manifest in question whenever a parsing error is
encountered.

11 years agoAuto merge of #1160 - alexcrichton:update, r=alexcrichton
bors [Tue, 13 Jan 2015 22:14:44 +0000 (22:14 +0000)]
Auto merge of #1160 - alexcrichton:update, r=alexcrichton

11 years agoUpdate to rust master
Alex Crichton [Tue, 13 Jan 2015 16:41:04 +0000 (08:41 -0800)]
Update to rust master

11 years agoAuto merge of #1161 - alexcrichton:issue-1159, r=huonw
bors [Tue, 13 Jan 2015 21:09:13 +0000 (21:09 +0000)]
Auto merge of #1161 - alexcrichton:issue-1159, r=huonw

Looks like these got tweaked from the compiler...

Closes #1159